package com.nbicc.survey.mapper;

import com.nbicc.parent.mapper.BaseMapper;
import com.nbicc.survey.po.Answer;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public interface AnswerMapper extends BaseMapper<Answer> {

    int countAnswererByQuestionnaireIdAndTopicId(@Param("questionnaireId") String questionnaireId,@Param("topicId") String topicId);

    List<Map<String, Serializable>> resultAggregator(@Param("questionnaireId") String questionnaireId, @Param("topicId") String topicId);

    Integer countByRespondentIdAndTopicIdOrResult(@Param("questionnaireId") String questionnaireId,@Param("topicId") String topicId,@Param("respondentId") String respondentId,@Param("result") String result);

}
